package org.bwgl.demo6.controller;

import org.springframework.web.bind.annotation.*;

@RestController
public class MyTest2 {
    @GetMapping("test2")
    public String test2(String user)
    {
        return  user;
    }
    @GetMapping("test3")
    public String test3(@RequestParam(value = "username",required = false) String user){
        return  user;
    }
    @PostMapping("test4")
    public  String test4(String user , int age ) {return  user+age;}
@PostMapping("test5")
public  String test5(@RequestBody UserOld user){
return  user.toString();
}

 @GetMapping("/hello/sym")
    public String test6(){
        return  "test6";
 }
}


